import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:oramemo/pages/circle/circle_router.dart';

import 'invitation_logic.dart';
import 'invitation_state.dart';

class InvitationPage extends StatelessWidget {
  const InvitationPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final InvitationLogic logic = Get.put(InvitationLogic());
    final InvitationState state = Get.find<InvitationLogic>().state;

    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        backgroundColor: Colors.white,
        elevation: 0,
        centerTitle: true,
        title: Text(
          '发送邀请',
          style: TextStyle(
            color: Colors.black,
            fontSize: 16.sp,
            fontFamily: 'Inter',
            fontWeight: FontWeight.w600,
            letterSpacing: 1,
          ),
        ),
        leading: IconButton(
          icon: Icon(Icons.arrow_back_ios, color: Colors.black, size: 20.sp),
          onPressed: () => Get.back(),
        ),
      ),
      body: Center(
        child: Column(
          children: [
            SizedBox(height: 120.h),
            Text(
              '邀请成员，分享与共创',
              style: TextStyle(
                color: Colors.black,
                fontSize: 16.sp,
                fontFamily: 'Inter',
                fontWeight: FontWeight.w400,
                letterSpacing: 1,
              ),
            ),
            SizedBox(height: 40.h),
            // 输入邮箱、手机号邀请按钮
            InkWell(
              onTap: () {
                Get.toNamed(CircleRouter.invsendPage);
              },
              child: Container(
                width: 330.w,
                height: 64.h,
                alignment: Alignment.center,
                decoration: ShapeDecoration(
                  color: const Color(0xFF2573FF),
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(24.r),
                  ),
                  shadows: [
                    BoxShadow(
                      color: const Color(0x19000000),
                      blurRadius: 8.r,
                      offset: const Offset(0, 2),
                      spreadRadius: 0,
                    )
                  ],
                ),
                child: Text(
                  '输入邮箱、手机号邀请',
                  textAlign: TextAlign.center,
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 16.sp,
                    fontFamily: 'Inter',
                    fontWeight: FontWeight.w700,
                  ),
                ),
              ),
            ),
            SizedBox(height: 35.h),
            // 面对面邀请按钮
            InkWell(
              onTap: () {
                Get.toNamed(CircleRouter.invcodePage);
              },
              child: Container(
                width: 330.w,
                height: 64.h,
                alignment: Alignment.center,
                decoration: ShapeDecoration(
                  color: const Color(0xFF0EAD69),
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(24.r),
                  ),
                  shadows: [
                    BoxShadow(
                      color: const Color(0x19000000),
                      blurRadius: 8.r,
                      offset: const Offset(0, 2),
                      spreadRadius: 0,
                    )
                  ],
                ),
                child: Text(
                  '面对面邀请',
                  textAlign: TextAlign.center,
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 16.sp,
                    fontFamily: 'Inter',
                    fontWeight: FontWeight.w700,
                  ),
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}
